<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::prefix('admin')->group(function (){
    Route::get('/','AdminController@index');
    //管理员登录
    Route::post('/user/login','UserController@adminLogin');

});

Route::middleware('admin')->prefix('admin')->group(function() {
    Route::get('/index', 'AdminController@home');
    Route::get('/console','AdminController@console');
    Route::get('/banner/list','AdminController@banner');
    Route::get('/banner/add','AdminController@bannerAdd');
    Route::get('/banner/edit','AdminController@bannerEdit');
    Route::get('/class/list','AdminController@classList');
    Route::get('/class/add','AdminController@classAdd');
    Route::get('/class/edit','AdminController@classEdit');
    Route::get('/goods/list','AdminController@goodsList');
    Route::get('/goods/add','AdminController@goodsAdd');
    ROute::get('/goods/edit','AdminController@goodsEdit');
    Route::get('/color/add','AdminController@colorAdd');
    Route::get('/menu/list','AdminController@menuList');
    Route::get('/menu/html/add','AdminController@menuAdd');
    Route::get('/role/html','AdminController@roleList');
    Route::get('/role/html/add','AdminController@roleAdd');
    Route::get('/role/html/edit','AdminController@roleEdit');
    Route::get('/user/html','AdminController@userList');
    Route::get('/user/html/add','AdminController@userAdd');
    Route::get('/order/html','AdminController@orderList');
    Route::get('/order/send/html','AdminController@orderSend');
    Route::get('/order/detail/html','AdminController@orderDetail');
    Route::get('/activity/html','AdminController@activityList');
    Route::get('/activity/html/add','AdminController@activityAdd');
    Route::get('/activity/html/edit','AdminController@activityEdit');
    Route::get('/score/html','AdminController@scoreList');
    Route::get('/member/html','AdminController@memberList');
    Route::get('/member/html/add','AdminController@memberAddHtml');
    Route::get('/sys/html','AdminController@systemHtml');
    Route::get('/goods/data/html','AdminController@goodsDataHtml');
    Route::get('/data/goods/html','AdminController@dataGoodsHtml');
    Route::get('/data/order/html','AdminController@dataOrderHtml');
    Route::get('/ping/html','AdminController@goodsPingHtml');
    Route::get('/ping/html/add','AdminController@goodsPingAddHtml');
    Route::get('/score/records/html','AdminController@scoreRecordsHtml');
    Route::get('/order/show/html','AdminController@orderShowHtml');
    Route::get('/score/recharge/html','AdminController@rechargeHtml');
    Route::get('/score/recharge/add/html','AdminController@rechargeAddHtml');
    Route::get('/score/recharge/edit/html','AdminController@rechargeEditHtml');
    Route::get('/score/pay/html','AdminController@payHtml');
    Route::get('/score/api/pay/list','ScoreController@scoreRechargePayApi');


    //查询销量前十的商品
    Route::get('/goods/sell/desc','IndexController@goodsSellNumByTenApi');

    //轮播管理
    Route::get('/banner/list/get','BannerController@bannerList');
    //上传轮播接口
    Route::post('/banner/api/add','BannerController@bannerAddApi');
    //编辑轮播接口
    Route::post('/banner/api/edit','BannerController@bannerEditApi');
    //删除轮播接口
    Route::post('/banner/api/delete','BannerController@bannerDeleteApi');
    //商品类型列表
    Route::get('/class/list/api','GoodsController@goodsClassListApi');
    //添加商品类型
    Route::post('/class/list/add','GoodsController@goodsClassAddApi');
    //编辑商品类型
    Route::post('/class/api/edit','GoodsController@goodsClassEditApi');
    //删除商品类型
    Route::post('/class/api/delete','GoodsController@goodsClassDeleteApi');
    //上传文件
    Route::post('/upload','GoodsController@upload');
    //上传商品
    Route::post('/goods/list/add','GoodsController@goodsAddApi');
    //编辑商品
    Route::post('/goods/list/edit','GoodsController@goodsEditApi');
    //删除图片
    Route::post('/goods/image/delete','GoodsController@goodsImageDeleteApi');
    //删除商品
    Route::post('/goods/list/delete','GoodsController@goodsDeleteApi');
    //商品列表
    Route::get('/goods/list/api','GoodsController@goodsListApi');
    //规格列表
    Route::get('/goods/sku/list','GoodsController@goodsSkuListApi');
    //颜色列表
    Route::get('/goods/color/list','GoodsController@goodsColorListApi');
    //上传规格
    Route::post('/goods/sku/add','GoodsController@goodsSkuAddApi');
    //上传颜色
    Route::post('/goods/color/add','GoodsController@goodsColorAddApi');
    //删除规格
    Route::post('/goods/sku/delete','GoodsController@goodsSkuDeleteApi');
    //删除颜色
    Route::post('/goods/color/delete','GoodsController@goodsColorDeleteApi');
    //一级菜单接口
    Route::get('/menu/api/one','UserController@oneMenuApi');
    //菜单列表接口
    Route::get('/menu/api/list','UserController@adminMenuApi');
    //菜单添加接口
    Route::post('/menu/api/add','UserController@adminMenuAddApi');
    //菜单删除接口
    Route::post('/menu/api/delete','UserController@adminMenuDeleteApi');
    //角色列表接口
    Route::get('/role/api/list','UserController@adminRoleApi');
    //角色新增接口
    Route::post('/role/api/add','UserController@adminRoleAuthorizationAddApi');
    //编辑角色权限接口
    Route::post('/role/api/edit','UserController@adminRoleAuthorizationSaveApi');
    //查询全部菜单接口
    Route::get('/role/api/menu','UserController@adminMenuAllApi');
    //管理员列表接口
    Route::get('/user/api/list','UserController@userListApi');
    //全部角色接口
    Route::get('/user/role/all','UserController@roleAllApi');
    //删除角色接口
    Route::post('/user/role/delete','UserController@roleDeleteApi');
    //新增管理员接口
    Route::post('/user/api/add','UserController@userAddApi');
    //删除管理员接口
    Route::post('/user/api/delete','UserController@userDeleteApi');
    //修改密码
    Route::post('/user/api/password','UserController@userPasswordSaveApi');
    //订单列表
    Route::get('/order/api/list','OrderController@orderListApi');
    //取消订单
    Route::post('/order/api/close','OrderController@orderCloseApi');
    //订单发货
    Route::post('/order/api/send','OrderController@orderSendApi');
    //查询活动接口
    Route::get('/activity/list/api','BannerController@activityListApi');
    //上传活动接口
    Route::post('/activity/api/add','BannerController@activityAddApi');
    //删除活动接口
    Route::post('/activity/api/delete','BannerController@activityDeleteApi');
    //编辑活动接口
    Route::post('/activity/api/edit','BannerController@activityEditApi');
    //积分列表接口
    Route::get('/score/api/list','ScoreController@scoreListApi');
    //积分审核记录接口
    Route::get('/score/api/records/list','ScoreController@scoreRecordsListApi');
    //积分审核
    Route::post('/score/api/edit','ScoreController@scoreEditApi');
    //删除积分记录
    Route::post('/score/api/delete','ScoreController@scoreRecordsDeleteApi');
    //会员列表接口
    Route::get('/member/api/list','MemberController@memberListApi');
    //新增假用户
    Route::post('/member/api/add','MemberController@memberAddApi');
    //删除用户
    Route::post('/member/api/delete','MemberController@memberDeleteApi');
    //设置用户为销售
    Route::post('/member/api/sell','MemberController@memberSetSellApi');
    //积分系统显示隐藏
    Route::post('/system/api/open','SystemController@scoreOpenApi');
    //其他设置
    Route::post('/system/api/other','SystemController@otherSetApi');
    //商品规格销量排行
//    Route::get('/goods/sku/data','GoodsController@goodsSkuDataApi');
    //商品颜色销量排行
//    Route::get('/goods/color/data','GoodsController@goodsColorDataApi');
    //订单统计
    Route::get('/order/tongji','OrderController@orderTongJi');
    //当月商品信息统计
    Route::get('/data/tongji/goods/api','DataController@dataGoodsTongjiApi');
    //当月订单信息统计
    Route::get('/data/tongji/order/api','DataController@dataGoodsTongjiApi');
    //后台赠送积分接口
    Route::post('/member/score/add','MemberController@userScoreAddApi');
    //商品评价接口
    Route::get('/goods/ping/api/list','GoodsController@goodsPingJiaDataApi');
    //商品评价删除
    Route::post('/goods/ping/api/delete','GoodsController@goodsPingJiaDeleteApi');
    //商品评价新增
    Route::post('/goods/ping/api/add','GoodsController@goodsPingJiaAddApi');
    //后台添加用户列表接口
    Route::get('/member/api/admin/list','MemberController@adminAddMemberApi');
    //订单数据导出
    Route::get('/order/api/export','OrderController@orderExport');
    //根据时间统计商品规格销量和颜色销量
    Route::post('/goods/by/date/api','GoodsController@goodsSellSkuAndColorApi');
    //充值套餐列表接口
    Route::get('/recharge/api/list','ScoreController@rechargeListApi');
    //充值套餐新增接口
    Route::post('/recharge/api/add','ScoreController@rechargeAddApi');
    //充值套餐编辑接口
    Route::post('/recharge/api/edit','ScoreController@rechargeEditApi');
    //充值套餐删除接口
    Route::get('/recharge/api/delete','ScoreController@rechargeDeleteApi');
});
